package com.study.others.systemOpe;

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;

import org.junit.Test;

/**
* @Name: SystemOutDemo02
* @Description: 转换流的应用：将标准输出流（打印字节流）转换成高效字符流，从而使用高效字符流向控制台输出数据。
* @Author: 李超	lc_jack@foxmail.com
* @CreateDate: 2017-1-16 下午9:34:27 
* @Version: V1.0
 */
public class SystemOutDemo02 {
	
	@Test
	public void test() throws IOException {
		//将标准输出流转换成高效字符流
		BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out)) ;
		//向控制台打印数据
		writer.write("hello") ;
		writer.newLine() ;
		writer.write("world") ;
		writer.newLine() ;
		writer.write("java") ;
		writer.newLine() ;
		writer.flush() ;
		
	}

}
